// 订奶天数设置
const dnTs = [{
    milkingDay: 30
  },
  {
    milkingDay: 60
  },
  {
    milkingDay: 90
  },
  {
    milkingDay: 120
  },
  {
    milkingDay: 180
  },
  {
    milkingDay: 360
  }
]

const bzdw_caption = ['袋', '盒', '瓶', '杯', '箱', '支', '碗', '桶', '件', '罐', '组', '板', '条', '提', '包', '无']

const formatTime = date => {
  const year = date.getFullYear()
  const month = date.getMonth() + 1
  const day = date.getDate()
  const hour = date.getHours()
  const minute = date.getMinutes()
  const second = date.getSeconds()

  return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
}

const formatNumber = n => {
  n = n.toString()
  return n[1] ? n : '0' + n
}


module.exports = {
  dnTs: dnTs,
  formatTime: formatTime,
  bzdw_caption: bzdw_caption
}